﻿#ifndef WIDGETREADCFG_H
#define WIDGETREADCFG_H

#include <QWidget>
#include <QGroupBox>
#include <QLineEdit>
#include <QTextEdit>
#include <QPushButton>
#include <QCheckBox>
#include <QSpinBox>
#include <QComboBox>
#include <QHBoxLayout>
#include <QTabWidget>
#include "ComCommon.h"
#include "WidgetReadRequest.h"


class WidgetReadCfg : public QWidget
{
    Q_OBJECT
public:
    explicit WidgetReadCfg(QWidget *parent = nullptr);

public:
    void setRequestCfg(const QMap<QString, PLCRequestData>& data);
    QMap<QString, PLCRequestData> getRequestCfg();
signals:

private:
    void setupUi();
    void initConnect();
    inline QString getTxt();

public:
    QPushButton* pbtnAdd;
    QPushButton* pbtnRemove;
    QPushButton* pbtnRemoveAll;
    QTabWidget* tabwgt;
};

#endif // WIDGETREADCFG_H
